﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:WinRTXamlToolkit.Debugging.Controls">
    <Style
        TargetType="controls:EditableListBoxItem">
        <Setter
            Property="Background"
            Value="Transparent" />
        <Setter
            Property="TabNavigation"
            Value="Local" />
        <Setter
            Property="Padding"
            Value="8,3" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:EditableListBoxItem">
                    <Border
                        x:Name="LayoutRoot"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="LayoutRoot">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemPointerOverBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemPointerOverForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="LayoutRoot">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To="1"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="PressedBackground" />
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemPressedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <!--<Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="InnerGrid">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </VisualState>
                                <VisualState
                                    x:Name="SelectedUnfocused">
                                    <!--<Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="InnerGrid">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </VisualState>
                                <VisualState
                                    x:Name="SelectedDisabled">
                                    <!--<Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="InnerGrid">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedDisabledBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </VisualState>
                                <VisualState
                                    x:Name="SelectedPointerOver">
                                    <!--<Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="InnerGrid">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedPointerOverBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </VisualState>
                                <VisualState
                                    x:Name="SelectedPressed">
                                    <!--<Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="InnerGrid">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To="1"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="FocusVisualWhite" />
                                        <DoubleAnimation
                                            Duration="0"
                                            To="1"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="FocusVisualBlack" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                                <VisualState
                                    x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="InnerGrid"
                            Background="Transparent">
                            <Rectangle
                                x:Name="PressedBackground"
                                Fill="{StaticResource ListBoxItemPressedBackgroundThemeBrush}"
                                Opacity="0" />
                            <ContentPresenter
                                x:Name="ContentPresenter"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                ContentTransitions="{TemplateBinding ContentTransitions}"
                                Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            <Rectangle
                                x:Name="FocusVisualWhite"
                                Opacity="0"
                                StrokeDashOffset=".5"
                                StrokeEndLineCap="Square"
                                Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                StrokeDashArray="1,1" />
                            <Rectangle
                                x:Name="FocusVisualBlack"
                                Opacity="0"
                                StrokeDashOffset="1.5"
                                StrokeEndLineCap="Square"
                                Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                StrokeDashArray="1,1" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>